//
//  DLProjectPropertyTool.m
//  DGGCommonSDK
//
//  Created by dgg_hzk on 2019/11/20.
//

#import "DLProjectPropertyTool.h"
#import <sys/utsname.h>

@implementation DLProjectPropertyTool

+ (NSString *)getAppVersion{
    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
}

+ (NSString *)getAppBuild{
    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
}

+ (NSString *)getBundleID{
    NSString *key = (NSString *)kCFBundleIdentifierKey;
    return [NSBundle mainBundle].infoDictionary[key];
}

+ (NSString *)getAppName{
    return [NSBundle mainBundle].infoDictionary[@"CFBundleDisplayName"];
}

+ (NSString *)getIosDeviceName{
    return [[UIDevice currentDevice]model];
}

+ (NSString *)getIosDeviceUUIDString{
    NSString *uuid = [[NSUUID UUID] UUIDString];
    return uuid;
}

+(NSString *)getIosDeviceSystemVersion{
    return [[UIDevice currentDevice] systemVersion];
}

+ (NSString *)documentPath{
    NSString *documentPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject];
    return documentPath;
}

+ (NSString *)cachePath{
    NSString *cachePath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
    return cachePath;
}

@end
